﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CommonLibrary.DataModel.Basic
{
    [Serializable]
    public class UserEntity
    {
        private String userImg = String.Empty;

        public UserEntity()
        {
            user_id = -1;
            staff_id = -1;
            user_ctime = "2000-01-01";
            user_lasttime = "2000-01-01";
            auth_id = -1;
            spqx_id = -1;
        }

        /// <summary>
        /// 用户id
        /// </summary>
        public int user_id { set; get; }

        /// <summary>
        ///  用户名称
        /// </summary>
        public string user_name { set; get; }

        /// <summary>
        /// 员工id
        /// </summary>
        public int staff_id { set; get; }

        /// <summary>
        /// 创建日期
        /// </summary>
        public string user_ctime { set; get; }

        /// <summary>
        /// 登陆名
        /// </summary>
        public string user_loginid { set; get; }

        /// <summary>
        /// 密码
        /// </summary>
        public string user_psw { set; get; }

        /// <summary>
        /// 状态 :有效，无效
        /// </summary>
        public string user_status { set; get; }

        /// <summary>
        ///  上次登陆时间
        /// </summary>
        public string user_lasttime { set; get; }

        /// <summary>
        ///  权限
        /// </summary>
        public Int32 auth_id { get; set; }

        /// <summary>
        ///  审批权限
        /// </summary>
        public Int32 spqx_id { set; get; }

        //站内信短信标志
        public Int32 user_znxdx { set; get; }

        //日历短信标志
        public Int32 user_rldx { set; get; }

        /// <summary>
        ///  头像
        /// </summary>
        public String user_img
        {
            get
            {

                return userImg;
            }
            set
            {
                if (String.IsNullOrEmpty(value))
                    userImg = @"System\HeadImg.jpg";
                else
                    userImg = value;
            }
        }



        #region 非库表字段

        public string dept_name { get; set; }

        public string duty_name { set; get; }

        //对应权限长字段
        public string authority { set; get; }

        #endregion

    }
}
